<template>
  <div id="main">
    <BackImage></BackImage>
    <Login></Login>
    <Register v-if="isRegister===1"></Register>
    <Reset v-if="isRegister===0"></Reset>
  </div>
</template>

<script>

import Login from './logindetail/Login.vue'
import BackImage from './logindetail/BackImage.vue';
import Register from './logindetail/Register.vue'
import Reset from './logindetail/Reset.vue'
export default {
    name:'LoginMain',
    data(){
      return{
        isRegister:1
      }
    },
    components:{
        Login,
        BackImage,
        Register,
        Reset
    },
    mounted(){
      this.$bus.$on('toleft',(data)=>{
        this.isRegister=data
      })
    },
    beforeDestroy(){
      this.$bus.$off('toleft')
    }
};
</script>

<style scoped>
#main {
  position: relative;
  left: 50%;
  top: 50%;
  transform: translate(-50%,-50%);
  width: 700px;
  height: 500px;
  background: rgba(0,0,0,0.1);
  border-radius: 20px;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);

  backdrop-filter: blur(10px);
}
</style>